{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 用户和活动关联关系处理\n",
    "\n",
    "\n",
    "整个数据集中活动数目（events.csv）太多，所以下面的处理我们找出只在训练集和测试集中出现的活动和用户集合，并对他们重新编制索引"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "#保存数据\n",
    "import pickle\n",
    "\n",
    "import itertools\n",
    "\n",
    "#处理事件字符串\n",
    "import datetime\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import scipy.io as sio\n",
    "import scipy.sparse as ss\n",
    "\n",
    "#相似度/距离\n",
    "import scipy.spatial.distance as ssd\n",
    "\n",
    "from collections import defaultdict\n",
    "from sklearn.preprocessing import normalize"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "number of uniqueUsers :3391\n",
      "number of uniqueEvents :13418\n"
     ]
    }
   ],
   "source": [
    " \"\"\"\n",
    "我们只关心train和test中出现的user和event，因此重点处理这部分关联数据\n",
    "\n",
    "train.csv 有6列：\n",
    "user：用户ID\n",
    "event：活动ID\n",
    "invited：是否被邀请（0/1）\n",
    "timestamp：ISO-8601 UTC格式时间字符串，表示用户看到该活动的时间\n",
    "interested, and not_interested\n",
    "\n",
    "Test.csv 除了没有interested, and not_interested，其余列与train相同\n",
    " \"\"\"\n",
    "    \n",
    "# 统计训练集中有多少不同的用户的events\n",
    "uniqueUsers = set()\n",
    "uniqueEvents = set()\n",
    "\n",
    "#倒排表\n",
    "#统计每个用户参加的活动   / 每个活动参加的用户\n",
    "eventsForUser = defaultdict(set)\n",
    "usersForEvent = defaultdict(set)\n",
    "    \n",
    "for filename in [\"train.csv\", \"test.csv\"]:\n",
    "    f = open(filename, 'rb')\n",
    "    \n",
    "    #忽略第一行（列名字）\n",
    "    f.readline().strip().split(b\",\")\n",
    "    \n",
    "    for line in f:    #对每条记录\n",
    "        cols = line.strip().split(b\",\")\n",
    "        uniqueUsers.add(cols[0])   #第一列为用户ID\n",
    "        uniqueEvents.add(cols[1])   #第二列为活动ID\n",
    "        \n",
    "        #eventsForUser[cols[0]].add(cols[1])    #该用户参加了这个活动\n",
    "        #usersForEvent[cols[1]].add(cols[0])    #该活动被用户参加\n",
    "    f.close()\n",
    "\n",
    "\n",
    "n_uniqueUsers = len(uniqueUsers)\n",
    "n_uniqueEvents = len(uniqueEvents)\n",
    "\n",
    "print(\"number of uniqueUsers :%d\" % n_uniqueUsers)\n",
    "print(\"number of uniqueEvents :%d\" % n_uniqueEvents)\n",
    "\n",
    "#用户关系矩阵表，可用于后续LFM/SVD++处理的输入\n",
    "#这是一个稀疏矩阵，记录用户对活动感兴趣\n",
    "userEventScores = ss.dok_matrix((n_uniqueUsers, n_uniqueEvents))\n",
    "userIndex = dict()\n",
    "eventIndex = dict()\n",
    "\n",
    "#重新编码用户索引字典\n",
    "for i, u in enumerate(uniqueUsers):\n",
    "    userIndex[u] = i\n",
    "    \n",
    "#重新编码活动索引字典    \n",
    "for i, e in enumerate(uniqueEvents):\n",
    "    eventIndex[e] = i\n",
    "\n",
    "n_records = 0\n",
    "ftrain = open(\"train.csv\", 'rb')\n",
    "ftrain.readline()\n",
    "for line in ftrain:\n",
    "    cols = line.strip().split(b\",\")\n",
    "    i = userIndex[cols[0]]  #用户\n",
    "    j = eventIndex[cols[1]] #活动\n",
    "    \n",
    "    eventsForUser[i].add(j)    #该用户参加了这个活动\n",
    "    usersForEvent[j].add(i)    #该活动被用户参加\n",
    "        \n",
    "    #userEventScores[i, j] = int(cols[4]) - int(cols[5])   #interested - not_interested\n",
    "    score = int(cols[4])\n",
    "    #if score == 0:  #0在稀疏矩阵中表示该元素不存在，因此借用-1表示interested=0\n",
    "    #userEventScores[i, j] = -1\n",
    "    #else:\n",
    "    userEventScores[i, j] = score\n",
    "ftrain.close()\n",
    "\n",
    "  \n",
    "##统计每个用户参加的活动，后续用于将用户朋友参加的活动影响到用户\n",
    "pickle.dump(eventsForUser, open(\"PE_eventsForUser.pkl\", 'wb'))\n",
    "##统计活动参加的用户\n",
    "pickle.dump(usersForEvent, open(\"PE_usersForEvent.pkl\", 'wb'))\n",
    "\n",
    "#保存用户-活动关系矩阵R，以备后用\n",
    "sio.mmwrite(\"PE_userEventScores\", userEventScores)\n",
    "\n",
    "\n",
    "#保存用户索引表\n",
    "pickle.dump(userIndex, open(\"PE_userIndex.pkl\", 'wb'))\n",
    "#保存活动索引表\n",
    "pickle.dump(eventIndex, open(\"PE_eventIndex.pkl\", 'wb'))\n",
    "\n",
    "    \n",
    "# 为了防止不必要的计算，我们找出来所有关联的用户 或者 关联的event\n",
    "# 所谓的关联用户，指的是至少在同一个event上有行为的用户pair\n",
    "# 关联的event指的是至少同一个user有行为的event pair\n",
    "uniqueUserPairs = set()\n",
    "uniqueEventPairs = set()\n",
    "for event in uniqueEvents:\n",
    "    i = eventIndex[event]\n",
    "    users = usersForEvent[i]\n",
    "    if len(users) > 2:\n",
    "        uniqueUserPairs.update(itertools.combinations(users, 2))\n",
    "        \n",
    "for user in uniqueUsers:\n",
    "    u = userIndex[user]\n",
    "    events = eventsForUser[u]\n",
    "    if len(events) > 2:\n",
    "        uniqueEventPairs.update(itertools.combinations(events, 2))\n",
    " \n",
    "#保存用户-事件关系对索引表\n",
    "pickle.dump(uniqueUserPairs, open(\"FE_uniqueUserPairs.pkl\", 'wb'))\n",
    "pickle.dump(uniqueEventPairs, open(\"PE_uniqueEventPairs.pkl\", 'wb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "#训练集和测试集中出现的用户数目和事件数目远小于users.csv出现的用户数和events.csv出现的事件数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1379185675,\n",
       " 3189486214,\n",
       " 4090120152,\n",
       " 899668139,\n",
       " 1077498346,\n",
       " 1089038689,\n",
       " 2969611776,\n",
       " 2843648870,\n",
       " 760152605,\n",
       " 692075109,\n",
       " 1579687184,\n",
       " 1033318499,\n",
       " 1419057761,\n",
       " 3712819742,\n",
       " 622120837,\n",
       " 1399415999,\n",
       " 3401681420,\n",
       " 2732810444,\n",
       " 2760876250,\n",
       " 3254851447,\n",
       " 1660678384,\n",
       " 1971855649,\n",
       " 3637523569,\n",
       " 477813398,\n",
       " 21534034,\n",
       " 1338116650,\n",
       " 3100093322,\n",
       " 3509870432,\n",
       " 573886273,\n",
       " 3950286482,\n",
       " 1294336672,\n",
       " 2043455253,\n",
       " 4223429256,\n",
       " 1295729468,\n",
       " 625259568,\n",
       " 3077019139,\n",
       " 1454534917,\n",
       " 3687555234,\n",
       " 2702494308,\n",
       " 4220107080,\n",
       " 3392552803,\n",
       " 3599006720,\n",
       " 2879361619,\n",
       " 1933542442,\n",
       " 2114371180,\n",
       " 414015310,\n",
       " 4228109405,\n",
       " 4040372452,\n",
       " 3064874467,\n",
       " 3643976476,\n",
       " 1486542415,\n",
       " 2193505055,\n",
       " 3039652825,\n",
       " 1838041662,\n",
       " 141146193,\n",
       " 414842182,\n",
       " 2953583082,\n",
       " 1521445358,\n",
       " 3701547443,\n",
       " 960296146,\n",
       " 1095829668,\n",
       " 1997149065,\n",
       " 201564442,\n",
       " 3199154012,\n",
       " 3382385081,\n",
       " 2190369261,\n",
       " 1330332438,\n",
       " 2925109008,\n",
       " 47443771,\n",
       " 2534465304,\n",
       " 334681152,\n",
       " 1470185288,\n",
       " 4055585686,\n",
       " 2429693803,\n",
       " 3733069609,\n",
       " 2107263424,\n",
       " 721858430,\n",
       " 20381932,\n",
       " 1466528489,\n",
       " 2583766647,\n",
       " 1414217450,\n",
       " 3106536799,\n",
       " 1267505164,\n",
       " 1969993396,\n",
       " 2955785263,\n",
       " 1836221047,\n",
       " 895171477,\n",
       " 4209032429,\n",
       " 1798745078,\n",
       " 1532094066,\n",
       " 59086176,\n",
       " 1051165850,\n",
       " 121419074,\n",
       " 3316772416,\n",
       " 3088405938,\n",
       " 2412834294,\n",
       " 1569036874,\n",
       " 756677655,\n",
       " 252563955,\n",
       " 126987905,\n",
       " 139229088,\n",
       " 4121771254,\n",
       " 288749001,\n",
       " 3795093910,\n",
       " 1257091773,\n",
       " 312824157,\n",
       " 3906291725,\n",
       " 3130359578,\n",
       " 2532840945,\n",
       " 284888222,\n",
       " 900803265,\n",
       " 3002742471,\n",
       " 949085150,\n",
       " 3258357208,\n",
       " 1876322819,\n",
       " 914532885,\n",
       " 111720609,\n",
       " 2940200534,\n",
       " 2961046023,\n",
       " 760916752,\n",
       " 814953804,\n",
       " 1103665416,\n",
       " 1043712341,\n",
       " 646938693,\n",
       " 249691528,\n",
       " 3589097685,\n",
       " 3086836700,\n",
       " 2507715258,\n",
       " 139221822,\n",
       " 2861164727,\n",
       " 1140161058,\n",
       " 1080261006,\n",
       " 985580109,\n",
       " 3639467255,\n",
       " 4040469677,\n",
       " 1240958240,\n",
       " 1346069916,\n",
       " 1444583217,\n",
       " 1262914219,\n",
       " 1396198787,\n",
       " 3770866498,\n",
       " 342284187,\n",
       " 1926865450,\n",
       " 4020625664,\n",
       " 1484456382,\n",
       " 2902086072,\n",
       " 3311545292,\n",
       " 750584397,\n",
       " 3364485916,\n",
       " 2788558996,\n",
       " 2168072348,\n",
       " 2685688752,\n",
       " 2378630297,\n",
       " 4017891961,\n",
       " 3809657858,\n",
       " 449479385,\n",
       " 1786302939,\n",
       " 51076977,\n",
       " 645947926,\n",
       " 314870193,\n",
       " 688003497,\n",
       " 732845339,\n",
       " 1397955556,\n",
       " 3108893200,\n",
       " 193057331,\n",
       " 2409838112,\n",
       " 2681949096,\n",
       " 811008612,\n",
       " 954409482,\n",
       " 4044222914,\n",
       " 3990500666,\n",
       " 679023125,\n",
       " 1095856197,\n",
       " 1579557996,\n",
       " 2921274626,\n",
       " 3367065897,\n",
       " 2784885848,\n",
       " 1690615074,\n",
       " 4202927804,\n",
       " 3213813029,\n",
       " 772318802,\n",
       " 1232655838,\n",
       " 1538008083,\n",
       " 3083345340,\n",
       " 2742796684,\n",
       " 3243313717,\n",
       " 4190936606,\n",
       " 892522920,\n",
       " 1621617792,\n",
       " 4110062919,\n",
       " 1998964568,\n",
       " 1648681304,\n",
       " 406293968,\n",
       " 1511862915,\n",
       " 3901290120,\n",
       " 3978034285,\n",
       " 3190640703,\n",
       " 3536426515,\n",
       " 1948173913,\n",
       " 398208897,\n",
       " 1722051160,\n",
       " 1967377951,\n",
       " 2466263946,\n",
       " 3717837762,\n",
       " 3774454065,\n",
       " 2250918448,\n",
       " 3352558065,\n",
       " 566545011,\n",
       " 2622473733,\n",
       " 1633364082,\n",
       " 446790947,\n",
       " 1041949398,\n",
       " 1333917247,\n",
       " 3799396636,\n",
       " 1234490218,\n",
       " 2691215697,\n",
       " 2104725357,\n",
       " 422354467,\n",
       " 3875955172,\n",
       " 261646692,\n",
       " 1857156364,\n",
       " 1825201512,\n",
       " 3477624372,\n",
       " 1118578975,\n",
       " 3025444328,\n",
       " 399364804,\n",
       " 785245384,\n",
       " 1814530527,\n",
       " 1566969892,\n",
       " 2611146411,\n",
       " 3371362346,\n",
       " 2808933304,\n",
       " 1622766919,\n",
       " 99027353,\n",
       " 1228296357,\n",
       " 1893629654,\n",
       " 4001241592,\n",
       " 245410232,\n",
       " 3559993637,\n",
       " 996787136,\n",
       " 3097390405,\n",
       " 119750609,\n",
       " 1712448138,\n",
       " 1389088809,\n",
       " 3680303526,\n",
       " 4241501571,\n",
       " 2985774237,\n",
       " 3163090701,\n",
       " 1565011423,\n",
       " 2358951559,\n",
       " 3758162883,\n",
       " 2293768387,\n",
       " 3916699033,\n",
       " 1336550405,\n",
       " 2287755049,\n",
       " 907511974,\n",
       " 1549366784,\n",
       " 2489574463,\n",
       " 3996685669,\n",
       " 3381519000,\n",
       " 2601678976,\n",
       " 2468898182,\n",
       " 1596190412,\n",
       " 1385126312,\n",
       " 426238334,\n",
       " 1566556513,\n",
       " 200218730,\n",
       " 2814323926,\n",
       " 2689464191,\n",
       " 3305669901,\n",
       " 3907799000,\n",
       " 3630632197,\n",
       " 727368927,\n",
       " 1612892907,\n",
       " 3318802055,\n",
       " 3176850745,\n",
       " 1686028847,\n",
       " 2453429820,\n",
       " 2460468313,\n",
       " 3975678118,\n",
       " 1779231622,\n",
       " 40744964,\n",
       " 2136853395,\n",
       " 846069276,\n",
       " 1901601017,\n",
       " 1977169313,\n",
       " 92434189,\n",
       " 3567156235,\n",
       " 3012452481,\n",
       " 3563635172,\n",
       " 3618189475,\n",
       " 1159558718,\n",
       " 2693387972,\n",
       " 807006174,\n",
       " 1094725860,\n",
       " 3712568774,\n",
       " 1821342748,\n",
       " 4146552769,\n",
       " 2389467513,\n",
       " 1841145872,\n",
       " 2379329185,\n",
       " 2293472224,\n",
       " 1064676677,\n",
       " 3842575553,\n",
       " 3501505424,\n",
       " 3923438992,\n",
       " 3295999782,\n",
       " 4049610607,\n",
       " 2584922845,\n",
       " 1607266075,\n",
       " 2618041707,\n",
       " 198166767,\n",
       " 459120486,\n",
       " 1822642771,\n",
       " 2456511255,\n",
       " 2442160767,\n",
       " 3684713379,\n",
       " 4256067371,\n",
       " 263011441,\n",
       " 2051603944,\n",
       " 1327762804,\n",
       " 188505465,\n",
       " 2493891004,\n",
       " 3016174135,\n",
       " 4106103231,\n",
       " 2236421139,\n",
       " 3642792280,\n",
       " 2715216804,\n",
       " 4338728,\n",
       " 1008778548,\n",
       " 2045110309,\n",
       " 1855529308,\n",
       " 252355585,\n",
       " 4222772842,\n",
       " 3686190194,\n",
       " 474449136,\n",
       " 3756572732,\n",
       " 1120137253,\n",
       " 2342980834,\n",
       " 2331932256,\n",
       " 3848300978,\n",
       " 1116212486,\n",
       " 290711008,\n",
       " 2848599369,\n",
       " 1411410860,\n",
       " 1314114792,\n",
       " 839562268,\n",
       " 129394252,\n",
       " 1771812765,\n",
       " 1332882278,\n",
       " 297601002,\n",
       " 798676219,\n",
       " 401374646,\n",
       " 610427555,\n",
       " 3334704715,\n",
       " 3118191184,\n",
       " 2920293801,\n",
       " 4125243964,\n",
       " 3955743405,\n",
       " 3565166403,\n",
       " 1869231286,\n",
       " 2915662989,\n",
       " 4153312619,\n",
       " 1114151918,\n",
       " 4147483412,\n",
       " 2138103664,\n",
       " 3353105116,\n",
       " 3588664375,\n",
       " 1223420734,\n",
       " 2326070806,\n",
       " 95061625,\n",
       " 2616716533,\n",
       " 3374652016,\n",
       " 2812330223,\n",
       " 3372111380,\n",
       " 2597857228,\n",
       " 559328902,\n",
       " 292032212,\n",
       " 3659838928,\n",
       " 3319506135,\n",
       " 1992961977,\n",
       " 1567986481,\n",
       " 410842839,\n",
       " 3773489407,\n",
       " 1059402615,\n",
       " 2925964144,\n",
       " 3807386691,\n",
       " 329123657,\n",
       " 3345225671,\n",
       " 1565147984,\n",
       " 4219244481,\n",
       " 1880608957,\n",
       " 3440289078,\n",
       " 1652875579,\n",
       " 1566716821,\n",
       " 3643004825,\n",
       " 834639430,\n",
       " 1437024757,\n",
       " 497346227,\n",
       " 1896396447,\n",
       " 3770539193,\n",
       " 2538041788,\n",
       " 87842054,\n",
       " 3124721005,\n",
       " 2271049585,\n",
       " 3633955351,\n",
       " 4238681272,\n",
       " 1501858181,\n",
       " 1202113718,\n",
       " 35305848,\n",
       " 3653306306,\n",
       " 432884667,\n",
       " 815464504,\n",
       " 4207934307,\n",
       " 2182473577,\n",
       " 3068611618,\n",
       " 890543862,\n",
       " 63677962,\n",
       " 3057340966,\n",
       " 2171536546,\n",
       " 2600301494,\n",
       " 3385455424,\n",
       " 2073339412,\n",
       " 3618085464,\n",
       " 2914054397,\n",
       " 1149414651,\n",
       " 567527059,\n",
       " 2665081210,\n",
       " 2762536315,\n",
       " 1723821298,\n",
       " 2793371951,\n",
       " 954775945,\n",
       " 2692654556,\n",
       " 1886219882,\n",
       " 1379671569,\n",
       " 2934155652,\n",
       " 3105353690,\n",
       " 2353865263,\n",
       " 3212455030,\n",
       " 1154950496,\n",
       " 2149315332,\n",
       " 1453975484,\n",
       " 1809088377,\n",
       " 2086300822,\n",
       " 2434261763,\n",
       " 2023259345,\n",
       " 3453637848,\n",
       " 3825145895,\n",
       " 851749287,\n",
       " 587454424,\n",
       " 2748538029,\n",
       " 273902811,\n",
       " 684180084,\n",
       " 1147733770,\n",
       " 3949611603,\n",
       " 4253067577,\n",
       " 232015242,\n",
       " 221604045,\n",
       " 2825861055,\n",
       " 627841864,\n",
       " 3911584808,\n",
       " 332142007,\n",
       " 432466438,\n",
       " 3414181314,\n",
       " 2122301874,\n",
       " 3593566246,\n",
       " 382018152,\n",
       " 372011842,\n",
       " 1403285194,\n",
       " 3577652785,\n",
       " 3772460243,\n",
       " 3874825374,\n",
       " 2415873572,\n",
       " 2779241460,\n",
       " 4125420656,\n",
       " 797378040,\n",
       " 3949287071,\n",
       " 3855173861,\n",
       " 2572191829,\n",
       " 3218575152,\n",
       " 3294243397,\n",
       " 715927047,\n",
       " 3797841998,\n",
       " 4177226936,\n",
       " 2517768885,\n",
       " 3391085910,\n",
       " 828951442,\n",
       " 426631217,\n",
       " 1051419581,\n",
       " 3252432592,\n",
       " 1027412797,\n",
       " 1629994289,\n",
       " 738069322,\n",
       " 1373783311,\n",
       " 3699419582,\n",
       " 3942891975,\n",
       " 2806189562,\n",
       " 1902921043,\n",
       " 2120836099,\n",
       " 1361358532,\n",
       " 1300718667,\n",
       " 1178225908,\n",
       " 4065600923,\n",
       " 4093453508,\n",
       " 916627849,\n",
       " 2363351901,\n",
       " 412637465,\n",
       " 708953850,\n",
       " 2768891421,\n",
       " 3633351483,\n",
       " 1645370294,\n",
       " 1011767003,\n",
       " 4281653989,\n",
       " 1074855174,\n",
       " 2361063319,\n",
       " 1810281079,\n",
       " 3002800200,\n",
       " 94072781,\n",
       " 1765518101,\n",
       " 544580953,\n",
       " 102952604,\n",
       " 328772197,\n",
       " 749859087,\n",
       " 2884132945,\n",
       " 909891171,\n",
       " 4218422552,\n",
       " 1730501944,\n",
       " 2233184763,\n",
       " 156491367,\n",
       " 2849940433,\n",
       " 1047407539,\n",
       " 1996708167,\n",
       " 2363285172,\n",
       " 3996301727,\n",
       " 2360970554,\n",
       " 2739214482,\n",
       " 1800619761,\n",
       " 210393825,\n",
       " 3530657203,\n",
       " 3615755136,\n",
       " 2486303679,\n",
       " 1000453597,\n",
       " 2156430059,\n",
       " 1441699239,\n",
       " 1985153611,\n",
       " 1927107595,\n",
       " 4033406811,\n",
       " 3658812660,\n",
       " 3764071536,\n",
       " 1690420493,\n",
       " 2038842201,\n",
       " 4176749504,\n",
       " 298871218,\n",
       " 2138889958,\n",
       " 2522843655,\n",
       " 754494201,\n",
       " 1783442779,\n",
       " 4208643265,\n",
       " 1100211249,\n",
       " 1635258225,\n",
       " 2338976654,\n",
       " 3919218328,\n",
       " 3069411884,\n",
       " 2035887714,\n",
       " 1660818988,\n",
       " 434543874,\n",
       " 428549163,\n",
       " 637049052,\n",
       " 3403413215,\n",
       " 2803381523,\n",
       " 3212079634,\n",
       " 1253368065,\n",
       " 3738629021,\n",
       " 65641389,\n",
       " 1710669663,\n",
       " 3906525090,\n",
       " 1684651848,\n",
       " 1196882187,\n",
       " 1433971994,\n",
       " 2490223551,\n",
       " 13620896,\n",
       " 2676279670,\n",
       " 2412989909,\n",
       " 2904491741,\n",
       " 264131666,\n",
       " 3701465217,\n",
       " 4151648493,\n",
       " 3188235554,\n",
       " 3513983552,\n",
       " 1623007742,\n",
       " 1113038458,\n",
       " 4085563097,\n",
       " 3188394122,\n",
       " 3348012164,\n",
       " 3899151655,\n",
       " 1160297188,\n",
       " 4072954907,\n",
       " 680270887,\n",
       " 2066735480,\n",
       " 904937903,\n",
       " 3304837598,\n",
       " 1526919341,\n",
       " 1452524777,\n",
       " 3398247231,\n",
       " 3050858997,\n",
       " 2464636842,\n",
       " 1023550880,\n",
       " 1530694090,\n",
       " 1642638618,\n",
       " 3805108320,\n",
       " 1391158753,\n",
       " 4193771689,\n",
       " 344135913,\n",
       " 150342414,\n",
       " 420579930,\n",
       " 1991938600,\n",
       " 2775969504,\n",
       " 261218444,\n",
       " 2973911742,\n",
       " 2055922065,\n",
       " 2949402180,\n",
       " 2200516096,\n",
       " 1710260937,\n",
       " 2000201086,\n",
       " 751257786,\n",
       " 1520803271,\n",
       " 45299662,\n",
       " 4138736243,\n",
       " 144836311,\n",
       " 1447532589,\n",
       " 2257756009,\n",
       " 333290432,\n",
       " 1407801833,\n",
       " 2072422072,\n",
       " 1383961059,\n",
       " 2834790159,\n",
       " 1707508219,\n",
       " 1490557433,\n",
       " 724467061,\n",
       " 389811473,\n",
       " 374048503,\n",
       " 2036538169,\n",
       " 293191359,\n",
       " 1134576678,\n",
       " 691895528,\n",
       " 305085824,\n",
       " 3430342894,\n",
       " 3802650890,\n",
       " 1206554126,\n",
       " 2173608003,\n",
       " 1203119679,\n",
       " 151426211,\n",
       " 2427264930,\n",
       " 3249170164,\n",
       " 3245843888,\n",
       " 697674217,\n",
       " 3185730461,\n",
       " 559455545,\n",
       " 488329448,\n",
       " 1001013482,\n",
       " 1287148023,\n",
       " 975764373,\n",
       " 1348209331,\n",
       " 3389184536,\n",
       " 1089819483,\n",
       " 2076577222,\n",
       " 3951031049,\n",
       " 1179651886,\n",
       " 237943335,\n",
       " 3626702003,\n",
       " 3521274632,\n",
       " 714296247,\n",
       " 3612086693,\n",
       " 4000251470,\n",
       " 4241901687,\n",
       " 2247712885,\n",
       " 2554291574,\n",
       " 1678145610,\n",
       " 3150073140,\n",
       " 186104502,\n",
       " 2693186870,\n",
       " 4215686475,\n",
       " 460925649,\n",
       " 3270799775,\n",
       " 1171067154,\n",
       " 1333188058,\n",
       " 2796594102,\n",
       " 763977262,\n",
       " 987194908,\n",
       " 2122716507,\n",
       " 3012443258,\n",
       " 2368889606,\n",
       " 1542554878,\n",
       " 1036961928,\n",
       " 1159681214,\n",
       " 1447011169,\n",
       " 1647929068,\n",
       " 3581275802,\n",
       " 568710964,\n",
       " 1349897681,\n",
       " 1603139322,\n",
       " 526068387,\n",
       " 1664519218,\n",
       " 275437483,\n",
       " 2232765899,\n",
       " 2633128735,\n",
       " 3007406784,\n",
       " 1068825763,\n",
       " 104363229,\n",
       " 1677401781,\n",
       " 926605391,\n",
       " 1275822727,\n",
       " 1873532916,\n",
       " 1815008506,\n",
       " 2660643006,\n",
       " 2573375708,\n",
       " 167963595,\n",
       " 176458041,\n",
       " 1162004917,\n",
       " 3515877913,\n",
       " 1801175686,\n",
       " 1894169490,\n",
       " 3663139999,\n",
       " 1795371268,\n",
       " 2315711455,\n",
       " 1178414645,\n",
       " 3153590943,\n",
       " 3571614737,\n",
       " 3055102570,\n",
       " 1709116685,\n",
       " 1068793163,\n",
       " 3735036412,\n",
       " 1361307272,\n",
       " 2206508128,\n",
       " 2639426191,\n",
       " 756383313,\n",
       " 736850175,\n",
       " 3281130769,\n",
       " 3516991107,\n",
       " 3489853891,\n",
       " 1156397533,\n",
       " 3147493880,\n",
       " 2740874943,\n",
       " 3007918636,\n",
       " 3571352784,\n",
       " 2024105424,\n",
       " 4254456631,\n",
       " 848152460,\n",
       " 2821117540,\n",
       " 3331186835,\n",
       " 3576964854,\n",
       " 1660590445,\n",
       " 3695530032,\n",
       " 2366289805,\n",
       " 2218325768,\n",
       " 106517927,\n",
       " 2224732799,\n",
       " 3566604706,\n",
       " 2183849299,\n",
       " 2003347053,\n",
       " 753153584,\n",
       " 1314055847,\n",
       " 1589137785,\n",
       " 748520427,\n",
       " 125703643,\n",
       " 788496445,\n",
       " 1832043495,\n",
       " 2859670510,\n",
       " 1427564900,\n",
       " 3110363670,\n",
       " 1951496954,\n",
       " 1704613170,\n",
       " 617227257,\n",
       " 4274310707,\n",
       " 4250784104,\n",
       " 3792500746,\n",
       " 3551254564,\n",
       " 1833493223,\n",
       " 3536688266,\n",
       " 3905745730,\n",
       " 582973300,\n",
       " 1662539682,\n",
       " 1299746069,\n",
       " 1627031750,\n",
       " 1445820524,\n",
       " 4001798355,\n",
       " 1364538695,\n",
       " 953356488,\n",
       " 556895940,\n",
       " 1669367540,\n",
       " 4267869375,\n",
       " 2704261655,\n",
       " 1873976153,\n",
       " 23065304,\n",
       " 4033897440,\n",
       " 791860627,\n",
       " 994310148,\n",
       " 121684017,\n",
       " 744407130,\n",
       " 3921422048,\n",
       " 2090866381,\n",
       " 29180020,\n",
       " 3138246349,\n",
       " 2142497014,\n",
       " 3315662669,\n",
       " 1868620616,\n",
       " 2377877379,\n",
       " 234197631,\n",
       " 1372844777,\n",
       " 702639971,\n",
       " 696973799,\n",
       " 3438843767,\n",
       " 2320431814,\n",
       " 629349865,\n",
       " 3465367492,\n",
       " 3704776276,\n",
       " 175799995,\n",
       " 4112975226,\n",
       " 2264207621,\n",
       " 2321880279,\n",
       " 1833759794,\n",
       " 1287096175,\n",
       " 1828726073,\n",
       " 3081495551,\n",
       " 848453528,\n",
       " 2213514822,\n",
       " 2106746558,\n",
       " 1177054501,\n",
       " 3598931817,\n",
       " 579777979,\n",
       " 3144708352,\n",
       " 2508555495,\n",
       " 409259074,\n",
       " 1492911169,\n",
       " 3017798619,\n",
       " 2010583664,\n",
       " 1960358461,\n",
       " 3481660815,\n",
       " 3899853175,\n",
       " 2787476717,\n",
       " 1394402721,\n",
       " 4032059949,\n",
       " 384131721,\n",
       " 3083954869,\n",
       " 2013712241,\n",
       " 1393708890,\n",
       " 444853728,\n",
       " 1384663745,\n",
       " 2325481526,\n",
       " 3826870896,\n",
       " 3859818831,\n",
       " 3319944668,\n",
       " 2433888237,\n",
       " 45273014,\n",
       " 1842491212,\n",
       " 3913331948,\n",
       " 3198275968,\n",
       " 1726301772,\n",
       " 1577425467,\n",
       " 414811541,\n",
       " 1840365070,\n",
       " 2473502708,\n",
       " 3055371642,\n",
       " 2993387051,\n",
       " 2611097725,\n",
       " 600512901,\n",
       " 902747271,\n",
       " 613851355,\n",
       " 3591208524,\n",
       " 3499523914,\n",
       " 1582270949,\n",
       " 2464117384,\n",
       " 1002527123,\n",
       " 3028432012,\n",
       " 3058109340,\n",
       " 573293150,\n",
       " 1807713409,\n",
       " 3412735820,\n",
       " 1699663431,\n",
       " 1549888315,\n",
       " 2380117374,\n",
       " 1550429882,\n",
       " 1711030046,\n",
       " 4215548909,\n",
       " 73460149,\n",
       " 2090707728,\n",
       " 1202537111,\n",
       " 2850910542,\n",
       " 1554701042,\n",
       " 899438727,\n",
       " 1231257462,\n",
       " 2284893483,\n",
       " 2285963249,\n",
       " 1574913732,\n",
       " 2660812160,\n",
       " 940033316,\n",
       " 2164892567,\n",
       " 3273695084,\n",
       " 3022634670,\n",
       " 300004583,\n",
       " 1014040686,\n",
       " 1330161973,\n",
       " 1159050153,\n",
       " 3350595681,\n",
       " 350511551,\n",
       " 3730940322,\n",
       " 1658576759,\n",
       " 1508286450,\n",
       " 3538439402,\n",
       " 3021192688,\n",
       " 3021201850,\n",
       " 2773204108,\n",
       " 945439689,\n",
       " 1769089355,\n",
       " 272472706,\n",
       " 906914792,\n",
       " 92230658,\n",
       " 1379101853,\n",
       " 2079400394,\n",
       " 3548695965,\n",
       " 1087635781,\n",
       " 3126487334,\n",
       " 2562099864,\n",
       " 2648833412,\n",
       " 4364520,\n",
       " 2997613878,\n",
       " 2803335863,\n",
       " 539541742,\n",
       " 4239674720,\n",
       " 301445362,\n",
       " 918139741,\n",
       " 1545807185,\n",
       " 1446341316,\n",
       " 224435617,\n",
       " 3771772284,\n",
       " 4055258235,\n",
       " 2236462300,\n",
       " 2844145532,\n",
       " 388159206,\n",
       " 3210395746,\n",
       " 3685002484,\n",
       " 965094203,\n",
       " 486391067,\n",
       " 2753805623,\n",
       " 2859758205,\n",
       " 2317641938,\n",
       " 3417522749,\n",
       " 17054803,\n",
       " 3985523814,\n",
       " 1807831177,\n",
       " 2978759688,\n",
       " 2430713742,\n",
       " 4294209504,\n",
       " 3700414799,\n",
       " 3946614613,\n",
       " 621292958,\n",
       " 2125679242,\n",
       " 3256763267,\n",
       " 2012232184,\n",
       " 1202672351,\n",
       " 293751558,\n",
       " 401976348,\n",
       " 3029154892,\n",
       " 2722317680,\n",
       " 2569103422,\n",
       " 3480624055,\n",
       " 3650881117,\n",
       " 2401798322,\n",
       " 2477400016,\n",
       " 974024618,\n",
       " 2005730896,\n",
       " 1448857745,\n",
       " 1392191159,\n",
       " 4012150032,\n",
       " 1064770050,\n",
       " 2505215665,\n",
       " 4054253362,\n",
       " 33770938,\n",
       " 2472934939,\n",
       " 3395036524,\n",
       " 3836293829,\n",
       " 1949386711,\n",
       " 1104384354,\n",
       " 3300418522,\n",
       " 2531209279,\n",
       " 1510219719,\n",
       " 485696274,\n",
       " 3871210244,\n",
       " 1769681665,\n",
       " 1942474082,\n",
       " 1078399009,\n",
       " 1670529571,\n",
       " 3161434996,\n",
       " 2379766619,\n",
       " 2728880989,\n",
       " 3777087288,\n",
       " 2750965517,\n",
       " 2755616470,\n",
       " 385934286,\n",
       " 2332683796,\n",
       " ...]"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "uniqueEvents = list(uniqueEvents)\n",
    "uniqueEvents1 = []\n",
    "for i in uniqueEvents:\n",
    "    i = int(bytes.decode(i))\n",
    "    uniqueEvents1.append(i)\n",
    "uniqueEvents1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>event_id</th>\n",
       "      <th>user_id</th>\n",
       "      <th>start_time</th>\n",
       "      <th>city</th>\n",
       "      <th>state</th>\n",
       "      <th>zip</th>\n",
       "      <th>country</th>\n",
       "      <th>lat</th>\n",
       "      <th>lng</th>\n",
       "      <th>c_1</th>\n",
       "      <th>...</th>\n",
       "      <th>c_92</th>\n",
       "      <th>c_93</th>\n",
       "      <th>c_94</th>\n",
       "      <th>c_95</th>\n",
       "      <th>c_96</th>\n",
       "      <th>c_97</th>\n",
       "      <th>c_98</th>\n",
       "      <th>c_99</th>\n",
       "      <th>c_100</th>\n",
       "      <th>c_other</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>684921758</td>\n",
       "      <td>3647864012</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>244999119</td>\n",
       "      <td>3476440521</td>\n",
       "      <td>2012-11-03T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>3928440935</td>\n",
       "      <td>517514445</td>\n",
       "      <td>2012-11-05T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>2582345152</td>\n",
       "      <td>781585781</td>\n",
       "      <td>2012-10-30T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1051165850</td>\n",
       "      <td>1016098580</td>\n",
       "      <td>2012-09-27T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1212611096</td>\n",
       "      <td>1426522332</td>\n",
       "      <td>2012-11-16T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>3689283674</td>\n",
       "      <td>725266702</td>\n",
       "      <td>2012-11-02T20:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2584113432</td>\n",
       "      <td>613687941</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>354</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3365728297</td>\n",
       "      <td>1098509207</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47.058</td>\n",
       "      <td>21.926</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>2912638473</td>\n",
       "      <td>3598071768</td>\n",
       "      <td>2012-10-18T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1609864127</td>\n",
       "      <td>4252244266</td>\n",
       "      <td>2012-11-06T22:40:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1304227508</td>\n",
       "      <td>4083498051</td>\n",
       "      <td>2012-08-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>2608543989</td>\n",
       "      <td>711497121</td>\n",
       "      <td>2012-11-12T17:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>36</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>298169907</td>\n",
       "      <td>1020819241</td>\n",
       "      <td>2012-12-01T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>2953099360</td>\n",
       "      <td>881617516</td>\n",
       "      <td>2012-08-26T17:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>120</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>615449287</td>\n",
       "      <td>3832426265</td>\n",
       "      <td>2012-08-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>1922719636</td>\n",
       "      <td>4185999054</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1261820355</td>\n",
       "      <td>1240515743</td>\n",
       "      <td>2012-11-08T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>2773204108</td>\n",
       "      <td>1999363021</td>\n",
       "      <td>2012-11-16T20:00:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>90</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>2285783902</td>\n",
       "      <td>44098316</td>\n",
       "      <td>2012-09-28T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1873976153</td>\n",
       "      <td>1918590410</td>\n",
       "      <td>2012-09-30T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>1820269907</td>\n",
       "      <td>1768539776</td>\n",
       "      <td>2012-10-23T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>1929622843</td>\n",
       "      <td>4235478695</td>\n",
       "      <td>2012-11-08T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>2312158323</td>\n",
       "      <td>3324266513</td>\n",
       "      <td>2012-10-05T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1091130052</td>\n",
       "      <td>3686526729</td>\n",
       "      <td>2012-10-04T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1888241344</td>\n",
       "      <td>4120508790</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>3436633625</td>\n",
       "      <td>3214543653</td>\n",
       "      <td>2012-09-27T02:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>3</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>1511862915</td>\n",
       "      <td>813883609</td>\n",
       "      <td>2012-11-04T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>3980763324</td>\n",
       "      <td>375876914</td>\n",
       "      <td>2012-10-31T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>2259674237</td>\n",
       "      <td>1065410499</td>\n",
       "      <td>2012-09-30T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137942</th>\n",
       "      <td>1139583805</td>\n",
       "      <td>516291217</td>\n",
       "      <td>2012-12-09T03:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137943</th>\n",
       "      <td>1111276575</td>\n",
       "      <td>2319467663</td>\n",
       "      <td>2012-06-22T20:00:00.000Z</td>\n",
       "      <td>Graham</td>\n",
       "      <td>Texas</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>33.087</td>\n",
       "      <td>-98.579</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137944</th>\n",
       "      <td>1875831541</td>\n",
       "      <td>415464198</td>\n",
       "      <td>2012-09-29T01:30:00.003Z</td>\n",
       "      <td>Santa Clara</td>\n",
       "      <td>CA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>37.354</td>\n",
       "      <td>-121.945</td>\n",
       "      <td>10</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>74</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137945</th>\n",
       "      <td>3546016674</td>\n",
       "      <td>3877433908</td>\n",
       "      <td>2012-10-27T20:00:00.003Z</td>\n",
       "      <td>Smyrna</td>\n",
       "      <td>DE</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>39.291</td>\n",
       "      <td>-75.633</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137946</th>\n",
       "      <td>522337111</td>\n",
       "      <td>1691864426</td>\n",
       "      <td>2013-09-13T00:00:00.002Z</td>\n",
       "      <td>Phoenix</td>\n",
       "      <td>AZ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>33.493</td>\n",
       "      <td>-112.053</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137947</th>\n",
       "      <td>785313863</td>\n",
       "      <td>972120445</td>\n",
       "      <td>2012-12-14T01:00:00.003Z</td>\n",
       "      <td>Sacramento</td>\n",
       "      <td>CA</td>\n",
       "      <td>85811</td>\n",
       "      <td>United States</td>\n",
       "      <td>38.567</td>\n",
       "      <td>-121.483</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>67</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137948</th>\n",
       "      <td>903636172</td>\n",
       "      <td>3399599494</td>\n",
       "      <td>2012-11-17T16:00:00.003Z</td>\n",
       "      <td>Allen Park</td>\n",
       "      <td>MI</td>\n",
       "      <td>48101</td>\n",
       "      <td>United States</td>\n",
       "      <td>42.271</td>\n",
       "      <td>-83.198</td>\n",
       "      <td>5</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>88</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137949</th>\n",
       "      <td>3242000627</td>\n",
       "      <td>1405646196</td>\n",
       "      <td>2012-11-03T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Chile</td>\n",
       "      <td>-34.981</td>\n",
       "      <td>-71.232</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>57</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137950</th>\n",
       "      <td>2249617071</td>\n",
       "      <td>3713078736</td>\n",
       "      <td>2012-03-24T12:00:00.000Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137951</th>\n",
       "      <td>1244671019</td>\n",
       "      <td>415464198</td>\n",
       "      <td>2012-08-12T19:00:00.000Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>9</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>132</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137952</th>\n",
       "      <td>630391888</td>\n",
       "      <td>2178330751</td>\n",
       "      <td>2012-11-16T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>20</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137953</th>\n",
       "      <td>2907019630</td>\n",
       "      <td>254788906</td>\n",
       "      <td>2012-09-22T16:00:00.003Z</td>\n",
       "      <td>Niagara-on-the-Lake</td>\n",
       "      <td>ON</td>\n",
       "      <td>NaN</td>\n",
       "      <td>Canada</td>\n",
       "      <td>43.206</td>\n",
       "      <td>-79.059</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>19</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137954</th>\n",
       "      <td>426326699</td>\n",
       "      <td>4013071259</td>\n",
       "      <td>2013-06-30T21:00:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137955</th>\n",
       "      <td>3375896456</td>\n",
       "      <td>1759137312</td>\n",
       "      <td>2012-03-24T20:00:00.000Z</td>\n",
       "      <td>Brooklyn</td>\n",
       "      <td>New York</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>40.676</td>\n",
       "      <td>-73.980</td>\n",
       "      <td>19</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>205</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137956</th>\n",
       "      <td>1719028779</td>\n",
       "      <td>2802157228</td>\n",
       "      <td>2012-12-15T20:00:00.003Z</td>\n",
       "      <td>Cesena</td>\n",
       "      <td>NaN</td>\n",
       "      <td>47522</td>\n",
       "      <td>Italy</td>\n",
       "      <td>44.110</td>\n",
       "      <td>12.200</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137957</th>\n",
       "      <td>1942649088</td>\n",
       "      <td>1984879856</td>\n",
       "      <td>2012-12-01T03:00:00.003Z</td>\n",
       "      <td>Boone</td>\n",
       "      <td>NC</td>\n",
       "      <td>28607</td>\n",
       "      <td>United States</td>\n",
       "      <td>36.218</td>\n",
       "      <td>-81.684</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137958</th>\n",
       "      <td>1359596891</td>\n",
       "      <td>540172555</td>\n",
       "      <td>2012-09-30T19:30:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>7</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137959</th>\n",
       "      <td>2612956139</td>\n",
       "      <td>681566693</td>\n",
       "      <td>2012-11-23T12:30:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137960</th>\n",
       "      <td>1802009396</td>\n",
       "      <td>2041035070</td>\n",
       "      <td>2012-06-10T00:00:00.000Z</td>\n",
       "      <td>Sherman Oaks</td>\n",
       "      <td>CA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>34.150</td>\n",
       "      <td>-118.431</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137961</th>\n",
       "      <td>2475436557</td>\n",
       "      <td>349466169</td>\n",
       "      <td>2012-04-14T14:00:00.000Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137962</th>\n",
       "      <td>929666420</td>\n",
       "      <td>1863343338</td>\n",
       "      <td>2012-11-24T20:00:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>24</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137963</th>\n",
       "      <td>1102736444</td>\n",
       "      <td>1025866016</td>\n",
       "      <td>2012-08-31T01:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>8</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137964</th>\n",
       "      <td>235320680</td>\n",
       "      <td>2112970838</td>\n",
       "      <td>2012-09-23T00:30:00.003Z</td>\n",
       "      <td>Tucson</td>\n",
       "      <td>AZ</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>32.206</td>\n",
       "      <td>-110.821</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137965</th>\n",
       "      <td>2309203910</td>\n",
       "      <td>3289322609</td>\n",
       "      <td>2012-12-07T23:00:00.003Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137966</th>\n",
       "      <td>1484355107</td>\n",
       "      <td>2540713688</td>\n",
       "      <td>2012-11-08T00:00:00.001Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>4</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137967</th>\n",
       "      <td>3206911916</td>\n",
       "      <td>3817662916</td>\n",
       "      <td>2012-06-07T14:00:00.000Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>45.238</td>\n",
       "      <td>11.754</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>45</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137968</th>\n",
       "      <td>3298484812</td>\n",
       "      <td>2119960237</td>\n",
       "      <td>2014-02-26T02:00:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137969</th>\n",
       "      <td>1331217755</td>\n",
       "      <td>1149466221</td>\n",
       "      <td>2012-12-02T07:30:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137970</th>\n",
       "      <td>1627348069</td>\n",
       "      <td>3748671867</td>\n",
       "      <td>2012-10-20T04:00:00.003Z</td>\n",
       "      <td>Hermosa Beach</td>\n",
       "      <td>CA</td>\n",
       "      <td>NaN</td>\n",
       "      <td>United States</td>\n",
       "      <td>33.857</td>\n",
       "      <td>-118.391</td>\n",
       "      <td>2</td>\n",
       "      <td>...</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>51</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3137971</th>\n",
       "      <td>1373240562</td>\n",
       "      <td>3334738518</td>\n",
       "      <td>2013-02-14T20:00:00.002Z</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>...</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3137972 rows × 110 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           event_id     user_id                start_time  \\\n",
       "0         684921758  3647864012  2012-10-31T00:00:00.001Z   \n",
       "1         244999119  3476440521  2012-11-03T00:00:00.001Z   \n",
       "2        3928440935   517514445  2012-11-05T00:00:00.001Z   \n",
       "3        2582345152   781585781  2012-10-30T00:00:00.001Z   \n",
       "4        1051165850  1016098580  2012-09-27T00:00:00.001Z   \n",
       "5        1212611096  1426522332  2012-11-16T00:00:00.001Z   \n",
       "6        3689283674   725266702  2012-11-02T20:00:00.003Z   \n",
       "7        2584113432   613687941  2012-10-31T00:00:00.001Z   \n",
       "8        3365728297  1098509207  2012-10-31T00:00:00.001Z   \n",
       "9        2912638473  3598071768  2012-10-18T00:00:00.001Z   \n",
       "10       1609864127  4252244266  2012-11-06T22:40:00.003Z   \n",
       "11       1304227508  4083498051  2012-08-31T00:00:00.001Z   \n",
       "12       2608543989   711497121  2012-11-12T17:00:00.003Z   \n",
       "13        298169907  1020819241  2012-12-01T00:00:00.001Z   \n",
       "14       2953099360   881617516  2012-08-26T17:00:00.003Z   \n",
       "15        615449287  3832426265  2012-08-31T00:00:00.001Z   \n",
       "16       1922719636  4185999054  2012-10-31T00:00:00.001Z   \n",
       "17       1261820355  1240515743  2012-11-08T00:00:00.001Z   \n",
       "18       2773204108  1999363021  2012-11-16T20:00:00.002Z   \n",
       "19       2285783902    44098316  2012-09-28T00:00:00.001Z   \n",
       "20       1873976153  1918590410  2012-09-30T00:00:00.001Z   \n",
       "21       1820269907  1768539776  2012-10-23T00:00:00.001Z   \n",
       "22       1929622843  4235478695  2012-11-08T00:00:00.001Z   \n",
       "23       2312158323  3324266513  2012-10-05T00:00:00.001Z   \n",
       "24       1091130052  3686526729  2012-10-04T00:00:00.001Z   \n",
       "25       1888241344  4120508790  2012-10-31T00:00:00.001Z   \n",
       "26       3436633625  3214543653  2012-09-27T02:00:00.003Z   \n",
       "27       1511862915   813883609  2012-11-04T00:00:00.001Z   \n",
       "28       3980763324   375876914  2012-10-31T00:00:00.001Z   \n",
       "29       2259674237  1065410499  2012-09-30T00:00:00.001Z   \n",
       "...             ...         ...                       ...   \n",
       "3137942  1139583805   516291217  2012-12-09T03:00:00.003Z   \n",
       "3137943  1111276575  2319467663  2012-06-22T20:00:00.000Z   \n",
       "3137944  1875831541   415464198  2012-09-29T01:30:00.003Z   \n",
       "3137945  3546016674  3877433908  2012-10-27T20:00:00.003Z   \n",
       "3137946   522337111  1691864426  2013-09-13T00:00:00.002Z   \n",
       "3137947   785313863   972120445  2012-12-14T01:00:00.003Z   \n",
       "3137948   903636172  3399599494  2012-11-17T16:00:00.003Z   \n",
       "3137949  3242000627  1405646196  2012-11-03T00:00:00.001Z   \n",
       "3137950  2249617071  3713078736  2012-03-24T12:00:00.000Z   \n",
       "3137951  1244671019   415464198  2012-08-12T19:00:00.000Z   \n",
       "3137952   630391888  2178330751  2012-11-16T00:00:00.001Z   \n",
       "3137953  2907019630   254788906  2012-09-22T16:00:00.003Z   \n",
       "3137954   426326699  4013071259  2013-06-30T21:00:00.002Z   \n",
       "3137955  3375896456  1759137312  2012-03-24T20:00:00.000Z   \n",
       "3137956  1719028779  2802157228  2012-12-15T20:00:00.003Z   \n",
       "3137957  1942649088  1984879856  2012-12-01T03:00:00.003Z   \n",
       "3137958  1359596891   540172555  2012-09-30T19:30:00.003Z   \n",
       "3137959  2612956139   681566693  2012-11-23T12:30:00.003Z   \n",
       "3137960  1802009396  2041035070  2012-06-10T00:00:00.000Z   \n",
       "3137961  2475436557   349466169  2012-04-14T14:00:00.000Z   \n",
       "3137962   929666420  1863343338  2012-11-24T20:00:00.002Z   \n",
       "3137963  1102736444  1025866016  2012-08-31T01:00:00.003Z   \n",
       "3137964   235320680  2112970838  2012-09-23T00:30:00.003Z   \n",
       "3137965  2309203910  3289322609  2012-12-07T23:00:00.003Z   \n",
       "3137966  1484355107  2540713688  2012-11-08T00:00:00.001Z   \n",
       "3137967  3206911916  3817662916  2012-06-07T14:00:00.000Z   \n",
       "3137968  3298484812  2119960237  2014-02-26T02:00:00.002Z   \n",
       "3137969  1331217755  1149466221  2012-12-02T07:30:00.002Z   \n",
       "3137970  1627348069  3748671867  2012-10-20T04:00:00.003Z   \n",
       "3137971  1373240562  3334738518  2013-02-14T20:00:00.002Z   \n",
       "\n",
       "                        city     state    zip        country     lat      lng  \\\n",
       "0                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "1                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "2                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "4                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "5                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "6                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "7                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "8                        NaN       NaN    NaN            NaN  47.058   21.926   \n",
       "9                        NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "10                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "11                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "12                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "13                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "14                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "15                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "16                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "17                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "18                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "19                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "20                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "21                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "22                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "23                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "24                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "25                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "26                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "27                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "28                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "29                       NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "...                      ...       ...    ...            ...     ...      ...   \n",
       "3137942                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137943               Graham     Texas    NaN  United States  33.087  -98.579   \n",
       "3137944          Santa Clara        CA    NaN  United States  37.354 -121.945   \n",
       "3137945               Smyrna        DE    NaN  United States  39.291  -75.633   \n",
       "3137946              Phoenix        AZ    NaN  United States  33.493 -112.053   \n",
       "3137947           Sacramento        CA  85811  United States  38.567 -121.483   \n",
       "3137948           Allen Park        MI  48101  United States  42.271  -83.198   \n",
       "3137949                  NaN       NaN    NaN          Chile -34.981  -71.232   \n",
       "3137950                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137951                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137952                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137953  Niagara-on-the-Lake        ON    NaN         Canada  43.206  -79.059   \n",
       "3137954                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137955             Brooklyn  New York    NaN  United States  40.676  -73.980   \n",
       "3137956               Cesena       NaN  47522          Italy  44.110   12.200   \n",
       "3137957                Boone        NC  28607  United States  36.218  -81.684   \n",
       "3137958                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137959                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137960         Sherman Oaks        CA    NaN  United States  34.150 -118.431   \n",
       "3137961                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137962                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137963                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137964               Tucson        AZ    NaN  United States  32.206 -110.821   \n",
       "3137965                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137966                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137967                  NaN       NaN    NaN            NaN  45.238   11.754   \n",
       "3137968                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137969                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "3137970        Hermosa Beach        CA    NaN  United States  33.857 -118.391   \n",
       "3137971                  NaN       NaN    NaN            NaN     NaN      NaN   \n",
       "\n",
       "         c_1   ...     c_92  c_93  c_94  c_95  c_96  c_97  c_98  c_99  c_100  \\\n",
       "0          2   ...        0     1     0     0     0     0     0     0      0   \n",
       "1          2   ...        0     0     0     0     0     0     0     0      0   \n",
       "2          0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3          1   ...        0     0     0     0     0     0     0     0      0   \n",
       "4          1   ...        0     0     0     0     0     0     0     0      0   \n",
       "5          0   ...        0     0     0     0     0     0     0     0      0   \n",
       "6          0   ...        0     0     0     0     0     0     0     0      0   \n",
       "7          0   ...        2     0     0     0     0     0     0     0      0   \n",
       "8          0   ...        0     0     0     0     0     0     0     1      0   \n",
       "9          1   ...        0     0     0     0     0     0     0     0      0   \n",
       "10         0   ...        0     0     0     0     0     0     0     0      0   \n",
       "11         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "12         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "13         1   ...        0     0     0     0     0     1     0     0      1   \n",
       "14         2   ...        0     1     1     0     0     0     0     0      0   \n",
       "15         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "16         1   ...        0     0     1     0     0     0     0     0      0   \n",
       "17         0   ...        0     0     1     0     0     0     0     0      0   \n",
       "18         0   ...        0     0     0     0     0     0     0     0      0   \n",
       "19         0   ...        0     0     2     0     0     0     0     0      0   \n",
       "20         0   ...        0     0     1     0     0     0     0     0      0   \n",
       "21         1   ...        1     0     0     0     0     0     0     0      0   \n",
       "22         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "23         0   ...        0     0     2     0     0     0     0     0      0   \n",
       "24         0   ...        0     0     2     0     0     0     0     0      0   \n",
       "25         0   ...        0     0     0     0     0     0     0     0      0   \n",
       "26         3   ...        0     0     0     0     0     0     0     0      0   \n",
       "27         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "28         1   ...        0     0     0     0     0     0     0     0      0   \n",
       "29         0   ...        0     0     2     0     0     0     0     0      0   \n",
       "...      ...   ...      ...   ...   ...   ...   ...   ...   ...   ...    ...   \n",
       "3137942    2   ...        0     0     0     0     0     0     1     0      0   \n",
       "3137943    1   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137944   10   ...        0     0     0     0     0     1     0     0      0   \n",
       "3137945    2   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137946    1   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137947    5   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137948    5   ...        0     1     0     0     0     0     0     2      0   \n",
       "3137949    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137950    1   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137951    9   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137952    1   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137953    0   ...        0     0     0     0     0     0     2     0      0   \n",
       "3137954    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137955   19   ...        0     0     0     0     1     0     0     4      0   \n",
       "3137956    4   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137957    0   ...        0     0     0     0     0     0     0     1      0   \n",
       "3137958    7   ...        0     0     1     0     1     0     1     0      0   \n",
       "3137959    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137960    2   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137961    1   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137962    0   ...        0     0     0     1     0     0     0     0      0   \n",
       "3137963    8   ...        0     0     1     0     0     0     0     0      0   \n",
       "3137964    2   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137965    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137966    4   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137967    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137968    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137969    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "3137970    2   ...        1     0     1     0     0     0     0     1      1   \n",
       "3137971    0   ...        0     0     0     0     0     0     0     0      0   \n",
       "\n",
       "         c_other  \n",
       "0              9  \n",
       "1              7  \n",
       "2             12  \n",
       "3              8  \n",
       "4              9  \n",
       "5             22  \n",
       "6             28  \n",
       "7            354  \n",
       "8             25  \n",
       "9              3  \n",
       "10            38  \n",
       "11             9  \n",
       "12            36  \n",
       "13            15  \n",
       "14           120  \n",
       "15             9  \n",
       "16             7  \n",
       "17             8  \n",
       "18            90  \n",
       "19             6  \n",
       "20            17  \n",
       "21             7  \n",
       "22             9  \n",
       "23             6  \n",
       "24             6  \n",
       "25             4  \n",
       "26            28  \n",
       "27             9  \n",
       "28            10  \n",
       "29             6  \n",
       "...          ...  \n",
       "3137942       19  \n",
       "3137943       22  \n",
       "3137944       74  \n",
       "3137945       12  \n",
       "3137946        2  \n",
       "3137947       67  \n",
       "3137948       88  \n",
       "3137949       57  \n",
       "3137950       41  \n",
       "3137951      132  \n",
       "3137952       20  \n",
       "3137953       19  \n",
       "3137954        5  \n",
       "3137955      205  \n",
       "3137956       37  \n",
       "3137957       12  \n",
       "3137958      100  \n",
       "3137959       12  \n",
       "3137960       37  \n",
       "3137961       12  \n",
       "3137962       24  \n",
       "3137963       45  \n",
       "3137964       17  \n",
       "3137965       35  \n",
       "3137966       33  \n",
       "3137967       45  \n",
       "3137968        8  \n",
       "3137969        2  \n",
       "3137970       51  \n",
       "3137971        1  \n",
       "\n",
       "[3137972 rows x 110 columns]"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "events_data = pd.read_csv('events.csv')\n",
    "events_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 130,
   "metadata": {},
   "outputs": [],
   "source": [
    "columns = events_data.columns\n",
    "events = pd.DataFrame(columns=columns)\n",
    "cnt=0\n",
    "for i in uniqueEvents1:\n",
    "    events = events.append(events_data.loc[events_data.event_id==i],ignore_index=True)\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         event_id     user_id                start_time            city  \\\n",
      "0      1379185675   947978913  2012-09-13T02:00:00.003Z         Toronto   \n",
      "1      3189486214  1176436376  2012-10-28T20:00:00.003Z             NaN   \n",
      "2      4090120152  3416671649  2012-10-13T05:00:00.003Z      Long Beach   \n",
      "3       899668139  1558385303  2012-11-18T04:00:00.003Z             NaN   \n",
      "4      1077498346  3631515235  2012-11-12T00:00:00.001Z             NaN   \n",
      "5      1089038689  2471762109  2012-09-26T00:00:00.001Z           Medan   \n",
      "6      2969611776  1626472083  2012-10-04T12:00:00.003Z           Nilai   \n",
      "7      2843648870  2577978364  2012-11-05T03:00:00.003Z      Long Beach   \n",
      "8       760152605   415464198  2012-08-01T02:00:00.000Z         Toronto   \n",
      "9       692075109    78587940  2012-10-28T01:00:00.003Z             NaN   \n",
      "10     1579687184  3352366411  2012-09-28T02:00:00.003Z        Bellevue   \n",
      "11     1033318499   137154249  2012-10-05T18:00:00.003Z         Ferizaj   \n",
      "12     1419057761  3661496765  2012-11-03T11:20:00.003Z             NaN   \n",
      "13     3712819742  1848092354  2012-11-01T00:00:00.001Z             NaN   \n",
      "14      622120837  1393325689  2012-09-26T18:00:00.003Z         Hoboken   \n",
      "15     1399415999  2196080133  2012-10-21T20:00:00.002Z         Toronto   \n",
      "16     3401681420  2092621516  2012-11-11T17:00:00.003Z             NaN   \n",
      "17     2732810444  2513241101  2012-11-21T03:00:00.003Z  West Hollywood   \n",
      "18     2760876250  3447714959  2012-10-27T00:00:00.002Z             NaN   \n",
      "19     3254851447  2892482680  2012-11-03T17:00:00.003Z             NaN   \n",
      "20     1660678384  2859879984  2012-10-20T21:00:00.003Z             NaN   \n",
      "21     1971855649   150570914  2012-11-04T02:00:00.003Z         Lubbock   \n",
      "22     3637523569   716334630  2012-10-06T04:00:00.003Z             NaN   \n",
      "23      477813398  1899675638  2012-11-14T11:00:00.003Z             NaN   \n",
      "24       21534034  1933568411  2012-12-15T01:00:00.003Z             NaN   \n",
      "25     1338116650  3294558629  2012-09-25T00:00:00.003Z        Hamilton   \n",
      "26     3100093322  3105577468  2012-09-06T00:00:00.003Z         Toronto   \n",
      "27     3509870432   629840229  2012-10-27T00:00:00.001Z             NaN   \n",
      "28      573886273   372436214  2012-10-28T11:30:00.003Z             NaN   \n",
      "29     3950286482   415464198  2012-10-31T22:00:00.002Z             NaN   \n",
      "...           ...         ...                       ...             ...   \n",
      "13388  1091316601   124779168  2012-10-13T01:00:00.003Z       San Diego   \n",
      "13389   524756826  2754621272  2012-07-28T22:00:00.000Z         Toronto   \n",
      "13390  2684225557   756360548  2012-10-14T04:00:00.003Z       Sunnyvale   \n",
      "13391  1480770482  3069120658  2012-10-06T05:00:00.003Z             NaN   \n",
      "13392  1637337509  2350576551  2012-10-28T04:30:00.003Z        Denpasar   \n",
      "13393  3506658662   423765660  2012-10-26T00:00:00.001Z             NaN   \n",
      "13394   158205194   218067063  2012-10-14T03:30:00.003Z       Inglewood   \n",
      "13395  2324717272  4175147173  2012-09-30T00:00:00.001Z             NaN   \n",
      "13396  3896860087  1036082742  2012-09-30T01:00:00.003Z             NaN   \n",
      "13397    54535450  4244103483  2012-10-10T15:00:00.002Z             NaN   \n",
      "13398  3582418533  3912727517  2012-10-03T00:00:00.001Z             NaN   \n",
      "13399  1602727924  3384232644  2012-09-29T01:00:00.003Z         Toronto   \n",
      "13400  2857665129  2105397633  2012-10-31T13:30:00.003Z             NaN   \n",
      "13401  1298449638   168429995  2012-08-20T01:00:00.003Z         Houston   \n",
      "13402  1801869689  2152760920  2012-11-01T02:00:00.003Z             NaN   \n",
      "13403  1061411905  3983904165  2012-12-07T03:00:00.003Z         Toronto   \n",
      "13404   445989197  3072433315  2012-11-03T20:00:00.003Z        Den Haag   \n",
      "13405   959243663   260246172  2012-10-30T02:00:00.003Z          Jepara   \n",
      "13406   806275357  3120771549  2012-10-19T01:00:00.003Z             NaN   \n",
      "13407  1255629030   804901063  2012-10-31T00:00:00.001Z             NaN   \n",
      "13408  3168283375  1079091779  2012-10-04T00:00:00.001Z             NaN   \n",
      "13409  1127307325  1393855154  2012-11-25T05:00:00.003Z             NaN   \n",
      "13410  1465884852  2588555933  2012-11-29T19:00:00.003Z          Durban   \n",
      "13411   491161389  1120286481  2012-11-22T06:00:00.003Z         Anaheim   \n",
      "13412  1298668930  1170814183  2012-10-12T00:00:00.001Z             NaN   \n",
      "13413  1372348184   608942721  2012-11-10T14:30:00.003Z             NaN   \n",
      "13414  3483003454  4135254945  2012-10-12T14:00:00.002Z       Straubing   \n",
      "13415   608423375  3098539551  2012-11-03T02:45:00.003Z    Buenos Aires   \n",
      "13416  3466325304  1018351727  2012-12-25T00:00:00.001Z             NaN   \n",
      "13417  1332759137   415464198  2012-10-31T00:00:00.001Z             NaN   \n",
      "\n",
      "         state     zip        country     lat      lng c_1   ...   c_92 c_93  \\\n",
      "0           ON     NaN         Canada  43.648  -79.375   0   ...      0    0   \n",
      "1          NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "2           CA     NaN  United States  33.756 -118.108   2   ...      0    0   \n",
      "3          NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "4          NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "5          NaN     NaN      Indonesia   3.565   98.659   0   ...      0    0   \n",
      "6          NaN     NaN       Malaysia   2.841  101.785   0   ...      0    0   \n",
      "7           CA     NaN  United States  33.761 -118.136   6   ...      0    1   \n",
      "8           ON     NaN         Canada  43.646  -79.394   4   ...      0    0   \n",
      "9          NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "10          WA     NaN  United States  47.616 -122.193   5   ...      0    0   \n",
      "11         NaN     NaN         Serbia  42.369   21.153   0   ...      0    0   \n",
      "12         NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13         NaN     NaN            NaN   0.000  109.333   0   ...      0    0   \n",
      "14          NJ     NaN  United States  40.746  -74.026   0   ...      0    0   \n",
      "15     Ontario     NaN         Canada  43.717  -79.341  34   ...      0    0   \n",
      "16         NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "17          CA   90069  United States  34.086 -118.383   0   ...      0    0   \n",
      "18         NaN     NaN            NaN     NaN      NaN   2   ...      0    0   \n",
      "19         NaN     NaN            NaN -25.717  -56.250   0   ...      0    0   \n",
      "20         NaN     NaN            NaN     NaN      NaN   2   ...      0    0   \n",
      "21          TX     NaN  United States  33.562 -101.855   1   ...      0    0   \n",
      "22         NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "23         NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "24         NaN     NaN            NaN     NaN      NaN   3   ...      0    0   \n",
      "25          ON     NaN         Canada  43.260  -79.878   0   ...      0    0   \n",
      "26          ON     NaN         Canada  43.646  -79.400   3   ...      0    0   \n",
      "27         NaN     NaN            NaN     NaN      NaN   1   ...      1    0   \n",
      "28         NaN     NaN            NaN  20.000   77.000   0   ...      0    0   \n",
      "29         NaN     NaN            NaN     NaN      NaN   3   ...      0    2   \n",
      "...        ...     ...            ...     ...      ...  ..   ...    ...  ...   \n",
      "13388       CA     NaN  United States  32.748 -117.127   2   ...      0    3   \n",
      "13389       ON     NaN         Canada  43.649  -79.421   4   ...      0    0   \n",
      "13390       CA     NaN  United States  37.376 -122.030   8   ...      0    0   \n",
      "13391      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13392      NaN     NaN      Indonesia  -8.743  115.212   4   ...      0    0   \n",
      "13393      NaN     NaN            NaN     NaN      NaN   1   ...      1    0   \n",
      "13394       CA     NaN  United States  33.947 -118.340   6   ...      0    0   \n",
      "13395      NaN     NaN            NaN  -6.355  107.129   0   ...      0    0   \n",
      "13396      NaN     NaN            NaN     NaN      NaN   5   ...      0    0   \n",
      "13397      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13398      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13399       ON     NaN         Canada  43.664  -79.380   1   ...      0    0   \n",
      "13400      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13401       TX     NaN  United States  29.836  -95.649   1   ...      0    0   \n",
      "13402      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13403       ON  M5V2V4         Canada  43.643  -79.402   2   ...      0    0   \n",
      "13404      NaN     NaN    Netherlands  52.063    4.261   2   ...      0    0   \n",
      "13405      NaN     NaN      Indonesia  -6.616  110.692   0   ...      0    0   \n",
      "13406      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13407      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13408      NaN     NaN            NaN     NaN      NaN   2   ...      0    0   \n",
      "13409      NaN     NaN            NaN     NaN      NaN   1   ...      0    0   \n",
      "13410      NaN     NaN   South Africa -29.812   30.994   3   ...      0    0   \n",
      "13411       CA   92802  United States  33.806 -117.912   3   ...      0    0   \n",
      "13412      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13413      NaN     NaN            NaN     NaN      NaN   3   ...      0    0   \n",
      "13414   Bayern     NaN        Germany  48.888   12.561   0   ...      0    0   \n",
      "13415      NaN     NaN      Argentina -34.569  -58.421   0   ...      0    0   \n",
      "13416      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "13417      NaN     NaN            NaN     NaN      NaN   0   ...      0    0   \n",
      "\n",
      "      c_94 c_95 c_96 c_97 c_98 c_99 c_100 c_other  \n",
      "0        0    0    0    1    0    0     0      30  \n",
      "1        0    0    0    0    0    0     0      14  \n",
      "2        0    0    0    0    0    0     2      17  \n",
      "3        0    0    0    0    0    0     0       8  \n",
      "4        0    0    0    0    0    0     0       8  \n",
      "5        0    0    0    0    0    0     0     109  \n",
      "6        0    0    0    0    0    0     0      15  \n",
      "7        0    0    0    0    0    0     0      86  \n",
      "8        0    0    0    0    0    0     0      44  \n",
      "9        0    0    0    0    0    0     0      20  \n",
      "10       0    0    0    0    0    0     0      34  \n",
      "11       0    0    0    0    0    0     0      19  \n",
      "12       0    0    0    0    0    0     0      12  \n",
      "13       0    0    0    0    0    0     0     153  \n",
      "14       0    0    0    0    0    0     0       7  \n",
      "15       0    0    0    0    0    4     0     233  \n",
      "16       0    0    0    0    0    0     0      26  \n",
      "17       0    0    0    0    0    0     0      31  \n",
      "18       0    0    1    0    0    1     0      24  \n",
      "19       0    0    0    0    0    0     0      88  \n",
      "20       0    0    0    0    0    0     0      78  \n",
      "21       0    0    0    0    0    0     0      28  \n",
      "22       0    0    0    0    0    0     0      20  \n",
      "23       0    0    0    0    0    0     0      71  \n",
      "24       0    0    0    0    0    0     0      36  \n",
      "25       0    1    0    0    0    0     0      41  \n",
      "26       0    0    0    0    0    0     0      78  \n",
      "27       0    0    0    0    0    0     0      11  \n",
      "28       0    0    0    0    0    0     0       4  \n",
      "29       2    0    0    0    0    0     1      41  \n",
      "...    ...  ...  ...  ...  ...  ...   ...     ...  \n",
      "13388    0    0    0    0    0    0     0     121  \n",
      "13389    0    0    0    0    2    0     0      52  \n",
      "13390    0    0    0    2    1    2     0      82  \n",
      "13391    0    0    0    0    0    0     0      71  \n",
      "13392    0    0    1    2    0    0     0     125  \n",
      "13393    0    0    0    0    0    0     0      11  \n",
      "13394    0    0    0    0    0    0     0      46  \n",
      "13395    0    0    0    0    0    0     0       4  \n",
      "13396    1    0    0    0    0    0     0      86  \n",
      "13397    0    0    0    0    0    0     0       8  \n",
      "13398    0    0    0    0    0    0     0      18  \n",
      "13399    0    0    0    0    0    0     0      34  \n",
      "13400    0    0    0    0    0    0     0      35  \n",
      "13401    0    0    0    1    0    0     0      89  \n",
      "13402    0    0    0    0    0    0     0      59  \n",
      "13403    0    0    0    0    0    0     0      52  \n",
      "13404    0    0    0    0    0    4     0     272  \n",
      "13405    0    0    0    0    0    0     0      22  \n",
      "13406    0    0    0    3    0    0     0      63  \n",
      "13407    0    0    0    0    0    0     0      13  \n",
      "13408    0    0    0    0    0    0     0      25  \n",
      "13409    0    0    0    0    0    0     0     109  \n",
      "13410    0    0    0    0    1    0     0     169  \n",
      "13411    0    0    0    0    0    0     0      36  \n",
      "13412    0    0    0    0    0    0     0     167  \n",
      "13413    1    0    0    4    0    0     0     146  \n",
      "13414    0    0    0    0    0    0     0       7  \n",
      "13415    0    0    0    0    0    0     0      29  \n",
      "13416    2    0    0    0    0    0     0      22  \n",
      "13417    0    0    0    0    0    0     0     214  \n",
      "\n",
      "[13418 rows x 110 columns]\n"
     ]
    }
   ],
   "source": [
    "print(events)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "metadata": {},
   "outputs": [],
   "source": [
    "events.to_csv('events2.csv',encoding=\"gbk\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
